#include <stdio.h>
#include <math.h>

int main(int argc, char const *argv[])
{
    double num;
    printf("请输入一个小数:");
    scanf("%lf",&num);
    printf("num=%lf\n",num);

    //double ceil(double num);
    printf("向上取最小整数：%lf\n",ceil(num));

    //double floor(double num);
    printf("向下取最大整数：%lf\n",floor(num));

    return 0;
}
